package com.atguigu.designpattern.decorator;

/**
* @program: springcloud
* @description: 装饰类
* @author: wangjun
* @create: 2021-05-19
**/
public class Decorator implements Component{

    private Component component;

    public void setComponent(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        if (component != null){
            component.operation();
        }
    }
}
